package com.example.client;

import com.example.domain.Books;
import com.example.domain.Borrow;
import com.example.domain.Users;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("informationservice")
public interface InformationClient {
    @PostMapping("/infor/addInformation")
    void addInformation(@RequestBody Users user);

    @GetMapping("/infor/updateBalance")
    boolean updateBalance(@RequestParam Books book, @RequestParam Long userId);

    @PostMapping("/infor/downPoints")
    Integer downPoints(@RequestBody Borrow borrow);

    @PostMapping("/infor/upPoints")
    void upPoints(@RequestBody Borrow borrow);
}
